<?php/** * 首页相关 * @author wangtao * @version 2012.01.24 */class index {	public static function html() {		$table = 'post_into_1';		#初始化模板
		$views = new smasrty();
		$db = mysqlDB::con();
		$newPostSQL = 'SELECT `Pid`, `Post_Title`, `Post_Link`, left( `Post_Content` , 512 ) AS `Post_Content`
		FROM `' . $table . '` ORDER BY `' . $table . '`.`Pid` DESC LIMIT 0 , 20';
		$newPost = $db->fetchAssoc($newPostSQL);		foreach ($newPost as $key=>$post) {
			$newPost[$key]['Post_Content'] = mb_substr(strip_tags($post['Post_Content']), 0, 140, 'utf-8');
		}
		
		$title = '我的订阅';
		
		$views -> assign('title', $title);
		$views -> assign('newPost', $newPost);
		$views -> assign('page', $newPost[0]['Pid']);
		$views -> display('index.html');	}}